﻿NExt.validator.Regex = function(value, message, pattern, options) {
    var defaultMessage = 'Please enter a valid value !';
    var regex = new RegExp(pattern, options || '');

    if (!regex.test(value)) {
        return message || defaultMessage;
    }

    return true;
};
